package com.example.myapplication.activity

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.blankj.utilcode.util.GsonUtils
import com.example.myapplication.R
import com.example.myapplication.databinding.ActivityDrawerBinding
import com.example.myapplication.databinding.ActivityMarkFriendBinding
import com.example.myapplication.model.mention.MentionUser



/**
 * @description:
 *
 * @author: wangrongfeng
 *
 * @create: 2023-05-16 18:47
 **/
class MarkFriendActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val binding: ActivityMarkFriendBinding = DataBindingUtil.setContentView(
            this, R.layout.activity_mark_friend)
        binding.edit.setDeleteCallback {

        }

        binding.btn2.setOnClickListener {
            println("ssss " + binding.edit.getContentText())
            println("ssss " +  binding.edit.getMentionUserJson())
        }

        binding.btn1.setOnClickListener {
           val start =    binding.edit.insertSpannableString(MentionUser("张三","1234"))
            println("ssss 起始位置 "+ start)
        }
    }


}